// shu.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"

int main(int argc, char* argv[])
{int a,b,c,d,e,f,g,h,i,j,k,l,n=0;
scanf("%d %d %d %d %d %d %d %d %d %d",&a,&b,&c,&d,&e,&f,&g,&h,&i,&j);
k=(double)(a+b+c+d+e+f+g+h+i+j)/10;
if(a>k)
n++;
if(b>k)
n++;
if(c>k)
n++;
if(d>k)
n++;
if(e>k)
n++;
if(f>k)
n++;
if(g>k)
n++;
if(h>k)
n++;
if(i>k)
n++;
if(j>k)
n++;

printf("%d",n);
	return 0;
}

